#region "ConfigurationSectionResult"

/*
 * ####     Developer Name : Wang Yucai
 * 
 * ####     Development Tool : Microsoft VisualStudio 2010 Ultimate Edition
 * 
 * ####     Create Time : 2014-07-11 10:13:33
 * 
 * ####     Namespace : Masterduner.SourceStudio.Practices.DevelopmentLibrary.Configuration
 * 
 * ####     Type Name : ConfigurationSectionResult
 * 
 * ####     Full Name : Masterduner.SourceStudio.Practices.DevelopmentLibrary.Configuration.ConfigurationSectionResult
 * 
 * ####     Machine Name : GLCHQWYCWINW7
 * 
 * ####     UserName : GUOCOLAND/wangyucai
 * 
 * ####     CLR Version : 4.0.30319.18444
 * 
 * ####     Target Framework Version : 4.0
 */

#endregion

using System.Configuration;

namespace Masterduner.SourceStudio.Practices.DevelopmentLibrary.Configuration
{
    /// <summary>
    /// <para>Masterduner.SourceStudio.Practices.DevelopmentLibrary.Configuration.ConfigurationSectionResult</para>
    /// <para>
    /// 用户自定义配置节结果集。
    /// </para>
    /// </summary>
    /// <typeparam name="TSection">继承自<see cref="ConfigurationSection"/>的对象实例。</typeparam>
    /// <remarks>
    /// <para>Target Framework Version : 4.0</para>
    /// </remarks>
    public class ConfigurationSectionResult<TSection>
        where TSection : ConfigurationSection
    {
        private TSection _configurationSectionInAppConfig;
        private TSection _configurationSectionInDevLibConfig;
        private TSection _configurationSectionInUserConfig;
        private string _sectionName;

        #region ConfigurationSectionInAppConfig
        /// <summary>
        /// 设置或获取用户设置在app.config文件中的自定义配置节。
        /// </summary>
        public virtual TSection ConfigurationSectionInAppConfig
        {
            get { return _configurationSectionInAppConfig; }
            set { _configurationSectionInAppConfig = value; }
        }
        #endregion

        #region ConfigurationSectionInDevLibConfig
        /// <summary>
        /// 设置或获取用户配置在开发库配置文件中的自定义配置节。
        /// </summary>
        public virtual TSection ConfigurationSectionInDevLibConfig
        {
            get { return _configurationSectionInDevLibConfig; }
            set { _configurationSectionInDevLibConfig = value; }
        }
        #endregion

        #region ConfigurationSectionInUserConfig
        /// <summary>
        /// 设置或获取用户配置在自定义配置文件中的自定义配置节。
        /// </summary>
        public virtual TSection ConfigurationSectionInUserConfig
        {
            get { return _configurationSectionInUserConfig; }
            set { _configurationSectionInUserConfig = value; }
        }
        #endregion

        #region SectionName
        /// <summary>
        /// 获取用户自定义配置节名称。
        /// </summary>
        public virtual string SectionName
        {
            get { return _sectionName; }
            protected set { _sectionName = value; }
        }
        #endregion

        #region Constructor

        /// <summary>
        /// <para>构造函数：</para>
        /// <para>初始化一个<see cref="ConfigurationSectionResult{T}" />对象实例。</para>
        /// </summary>
        /// <param name="sectionName">用户自定义配置节名称。</param>
        public ConfigurationSectionResult(string sectionName)
        {
            this.SectionName = sectionName;
        }

        #endregion
    }
}

#region README

/*
 * ####     ©2014 Wang Yucai
 * 
 * ####     Contact me
 *                  
 *                  E-mail : Masterduner@Yeah.net
 *                  Mobile : 13621384677
 *                  QQ : 180261899
 */

#endregion